//
//  DSBaseViewController.h
//  DSJY
//
//  Created by 冯华强 on 16/9/24.
//  Copyright © 2016年 dsjy. All rights reserved.
//  父控制器

#import <UIKit/UIKit.h>
#import "GlobalHeader.h"

@interface DSBaseViewController : UIViewController

///是否显示backItem
@property (nonatomic, assign, getter=isShowBackItem) BOOL showBackItem;

//刷新表格
- (void)reloadDataWithTableView:(nonnull UITableView *)tableView currentPage:(NSInteger)currentPage totalPage:(NSInteger)totalPage;

//刷新表格
- (void)reloadDataWithCollectionView:(nonnull UICollectionView *)collectionView currentPage:(NSInteger)currentPage totalPage:(NSInteger)totalPage;

#pragma mark - 网络
/**
 *  检查网络状态后会根据状态调用相应的网络方法
 *  networkWiFiSignal、networkWWANSignal、networkWiFiWWANSignal、networkUnknownNotReachableSignal
 *
 *  @param refreshType 刷新方式
 */
- (void)checkNetWorkWithRefreshType:(YQRefreshType)refreshType;

/**
 *  WiFi网络
 */
@property(nonatomic, strong, nonnull) RACSubject *networkWiFiSignal;
/**
 *  2G/3G/4G网络
 */
@property(nonatomic, strong, nonnull) RACSubject *networkWWANSignal;
/**
 *  WiFi网络/2G/3G/4G网络
 */
@property(nonatomic, strong, nonnull) RACSubject *networkWiFiWWANSignal;
/**
 *  无网络
 */
@property(nonatomic, strong, nonnull) RACSubject *networkUnknownNotReachableSignal;

/**
 *  显示无网络提示
 *  scrollView:如果有传入，则结束上下拉、更多状态
 */
- (void)showEmptyHUDWithView:(nullable UIScrollView *)scrollView;

@end
